{{include file="default/Public/header.html"}} 
<script language="javascript" src="{{$smarty.const._PUBLIC_}}js/editable/jquery.editable.js"></script> 
<script language="javascript">
$().ready(function (){	
	$(".editable").editable("{{U url='ffile/edit?ajax=savetplnote'}}",{
			indicator : '<img src="__ROOT__/admin/Public/images/loading2.gif" />',
      tooltip   : "点击可编辑",
			name			: 'note',
			id				: 'filename',
			placeholder : '错误',
			select	  : true,
			event	  : "click",
			onblur : "submit"
	});
});
</script>
<div id="pageTop">
  <div class="tabs">
    <ul>
      <li><a href='{{U url="ffile/manage"}}' {{if $action_name=="manage"}}class="selected"{{/if}}>管理文件</a></li>
    </ul>
  </div>
</div>
<div id="pageCo">
  <div class="listForm">
    <table cellpadding="0" cellspacing="0">
      <thead>
        <tr>
          <th width="200" class="btn">文件名</th>
          <th class="btn">描述</th>
          <th width="150" class="btn">修改时间</th>
          <th width="80">操　作</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td colspan="5">当前模板位置：<b class="green">根目录 {{$folder}}</b> {{if !empty($pfolder)}}<a href='__ROOT__/admin.php?m=ffile&a=manage&folder={{$pfolder}}'><img src="{{$smarty.const._PUBLIC_}}images/dir2.gif" />上级目录</a>{{else}}<a href='{{U url="ffile/manage"}}'><img src="{{$smarty.const._PUBLIC_}}images/dir2.gif" />上级目录</a>{{/if}}
            <input type="button" class="dialog" alt="__ROOT__/admin.php?m=fupload&amp;a=fieldallupload&amp;fieldid=325&amp;shower_id=files_box&amp;multi=true&amp;height=250&amp;width=500&folder={{$folder}}" title="从电脑上传文件" id="upload_img_325" value="上传文件"></td>
        </tr>
      {{foreach from=$data item=v}}
      {{if $v.isDir}}
      <tr>
        <td><img src="{{$smarty.const._PUBLIC_}}images/dir.gif" /> <a href="{{U url="ffile/manage?folder=`$folder`/`$v.filename`&path=`D:\www\dev\art`"}}">{{$v.filename}}</a></td>
        <td>文件夹</td>
        <td>&nbsp;</td>
        <td><a href="{{U url="ffile/manage?folder=`$folder`/`$v.filename`"}}">展开</a></td>
      </tr>
      {{else}}
      <tr>
        <td><img src="{{$smarty.const._PUBLIC_}}images/file.gif" /> {{$v.filename}}</td>
        <td><span class="editable pointer" id="tpl_{{$folder}}/{{$v.filename}}">{{if !empty($v.note)}}{{$v.note}}{{else}}暂无描述{{/if}}</span></td>
        <td>{{'Y-m-d H:i:s'|date:$v.mtime}}</td>
        <td>{{if in_array($v.ext,$ext)}}<a href="{{U url="ffile/edit?filename=`$folder`/`$v.filename`"}}">编辑</a>{{/if}} | <a href="{{U url="ffile/delete?filename=`$folder`/`$v.filename`"}}" onClick="return window.confirm('此操作不可撤销，你确定要删除该文件?');">删除</a></td>
      </tr>
      {{/if}}
      {{/foreach}}
        </tbody>
      
    </table>
  </div>
  <div class="pageList"> {{$data.pages}}
    <ul class="clearit">
    </ul>
  </div>
</div>
{{include file="default/Public/footer.html"}}